﻿<%@ Page Language="C#" MasterPageFile="~/Common/Master/FrameMain.master" AutoEventWireup="true" ValidateRequest="false" Inherits="WebMail_Edit" Title="无标题页" Codebehind="Edit.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript" src="../../common/Js/attach.js"></script>
  <script type="text/javascript" src="../../Common/fckeditor/fckeditor.js"></script>

    <script type="text/javascript">  
    
    function ShowHideCopy()
    {
        var src = event.srcElement;
        var trCopy1 = document.getElementById("trCopy1");
        var trCopy2 = document.getElementById("trCopy2");
        if(trCopy1.style.display == "none")
        {
            trCopy1.style.display = "";
            trCopy2.style.display = "";
            src.innerText = "隐藏抄送";
        }
        else
        {
            trCopy1.style.display = "none";
            trCopy2.style.display = "none";
            src.innerText = "显示抄送";
        }
    }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="toolbar">
        <ul>
            <li><a id="lnkSend" runat="server" href="javascript:;"><span><b style="background-image: url(../../common/images/Mail/send.gif);
                width: 35px;">&nbsp;</b><asp:Literal ID="Literal1" runat="server" Text="发送"></asp:Literal></span></a></li>
            <li><a id="lnkSave" runat="server" href="javascript:;"><span><b style="background-image: url(../../common/images/Mail/save.gif);">
                &nbsp;</b>
                <asp:Literal ID="Literal2" runat="server" Text="存草稿"></asp:Literal></span></a></li>
            <li><a id="lnkCancel" runat="server" href="javascript:history.back();"><span><b style="background-image: url(../../common/images/Mail/cancel.gif);">
                &nbsp;</b>
                <asp:Literal ID="Literal3" runat="server" Text="取消"></asp:Literal></span></a></li>
           <li><a href="javascript:history.back();"><span><b style="background-image: url(../../common/images/Mail/back.gif);">
                &nbsp;</b><asp:Literal ID="Literal4" runat="server" Text="返回"></asp:Literal></span></a></li>
        </ul>
    </div>
    <div style="padding-top: 5px; padding-left: 10px; padding-right: 10px;">
        <asp:Panel ID="pnlMain" runat="server" Width="100%">
            <table border="0" cellpadding="0" cellspacing="4" style="width: 100%">
                <tr>
                    <td style="width: 71px" align="center" nowrap="nowrap">
                        <asp:Label ID="Label5" runat="server" Text="发件人："></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="drpAccount" runat="server" Width="200px">
                        </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                        <a href="#" onclick="ShowHideCopy()">显示抄送</a>
                    </td>
                </tr>
                <tr>
                    <td align="center" nowrap="nowrap">
                        <asp:Label ID="Label1" runat="server" Text="收件人："></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="ToAddr" runat="server" Width="99%" CssClass="txt"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="None"
                            ErrorMessage="请选择输入收件人地址" ControlToValidate="ToAddr"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr class="dashed">
                    <td colspan="2">
                    </td>
                </tr>
                <tr id="trCopy1" style="display: none">
                    <td style="width: 71px" align="center" nowrap="nowrap">
                        <asp:Label ID="Label2" runat="server" Text="抄　送："></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="CCAddr" runat="server" Width="99%" CssClass="txt"></asp:TextBox>
                    </td>
                </tr>
                <tr id="trCopy2" style="display: none" class="dashed">
                    <td colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 71px" align="center" nowrap="nowrap">
                        <asp:Label ID="Label3" runat="server" Text="主　题："></asp:Label>
                    </td>
                    <td>
                        <div><asp:TextBox ID="Name" runat="server" Width="99%" CssClass="txt"></asp:TextBox></div>
                    </td>
                </tr>
                <tr class="dashed">
                    <td colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 71px" align="center">
                        <asp:Label ID="Label4" runat="server" Text="附　件："></asp:Label>
                    </td>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td style="width: 80px">
                                     <script type="text/javascript">
                                         Attach("fileList");
                                      </script>
                                </td>
                                <td id="fileList" style="word-break: break-all; padding-left: 5px;">
                                    <asp:Repeater ID="rptAttach" runat="server">
                                        <ItemTemplate>
                                            <asp:Image ID="Image1" runat="server" ImageUrl="~/common/images/Common/attach.gif" /><asp:HiddenField
                                                ID="hidID" Value='<%# Eval("ID") %>' runat="server" />
                                            <asp:CheckBox ID="chkSelect" runat="server" Checked="true" TextAlign="left" Text='<%# Eval("Name") %>' />;&nbsp;
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr class="dashed">
                    <td colspan="2">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="">
                         <script type="text/javascript">
                <!--
                             // Automatically calculates the editor base path based on the _samples directory.
                             // This is usefull only for these samples. A real application should use something like this:
                             // oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
                             var sBasePath = "/common/fckeditor/";

                             var oFCKeditor = new FCKeditor('Content');
                             oFCKeditor.BasePath = sBasePath;
                             oFCKeditor.Height = 400;
                             oFCKeditor.Width = 700;
                             oFCKeditor.ToolbarSet = "SiteAdmin";
                             oFCKeditor.Value = '<%=Content %>';
                             oFCKeditor.Create();
                //-->
                        </script>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <div id="toolbar_bottom">
        <asp:Button ID="btnSend" runat="server" Text="发送" OnClick="btnSend_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="取消" CausesValidation="False" OnClientClick="history.back();return false;" />
        <asp:Button ID="btnSave" runat="server" Text="存草稿" OnClick="btnSave_Click" CssClass="hide" />
    </div>
</asp:Content>
